package chapter11;

import java.util.*;

/**
 * Created by Caesar on 2015/12/22.
 */
public class AddingGroups {
    public static void main(String[] args) {
        Collection<Integer> coll = new ArrayList<Integer>(Arrays.asList(1, 2, 3, 4, 5));
        Integer[] moreInts = {6, 7, 8, 9, 10};
        coll.addAll(Arrays.asList(moreInts));
        for(Integer e :coll)
            System.out.println(e);
        Collections.addAll(coll, 11, 12, 13, 14, 15);
        Collections.addAll(coll, moreInts);
        List<Integer> list = Arrays.asList(16, 17, 18, 19, 20);
        list.set(1,99);
        System.out.println("list:");
        for(Integer e :list)
            System.out.println(e);
    }
}
